import request from '@/utils/request'

// 查询去哪选项列表
export function listWhereToGoOption(query) {
  return request({
    url: '/play/whereToGoOption/list',
    method: 'get',
    params: query
  })
}

// 根据模块ID查询选项列表
export function listWhereToGoOptionByModule(moduleId) {
  return request({
    url: '/play/whereToGoOption/listByModule/' + moduleId,
    method: 'get'
  })
}

// 查询去哪选项详细
export function getWhereToGoOption(id) {
  return request({
    url: '/play/whereToGoOption/' + id,
    method: 'get'
  })
}

// 新增去哪选项
export function addWhereToGoOption(data) {
  return request({
    url: '/play/whereToGoOption',
    method: 'post',
    data: data
  })
}

// 修改去哪选项
export function updateWhereToGoOption(data) {
  return request({
    url: '/play/whereToGoOption',
    method: 'put',
    data: data
  })
}

// 删除去哪选项
export function delWhereToGoOption(id) {
  return request({
    url: '/play/whereToGoOption/' + id,
    method: 'delete'
  })
}

// 更新选项热度值
export function updateOptionPopularity(id) {
  return request({
    url: '/play/whereToGoOption/updatePopularity/' + id,
    method: 'post'
  })
} 